package com.example.ang.tripapp.utils;

import android.util.Log;

import com.example.ang.tripapp.base.MyApplication;


/**
 * ***********************************************************
 * author: andy
 * time：15/12/1
 * name:日志的工具类
 * step:
 * 1，通过开关，判断是否打印log信息
 * *************************************************************
 */
public class Logger {
    private static final String TAG="Logger";

    /**
     * debug级别
     * @param msg
     */
    public static void d(String msg){
        if(MyApplication.isDebug){
            Log.d(TAG,msg);
        }
    }

    /**
     * warning级别
     * @param msg
     */
    public static void w(String msg){
        if(MyApplication.isDebug){
            Log.w(TAG, msg);
        }
    }

    /**
     * error级别
     * @param msg
     */
    public static void e(String msg){
        if(MyApplication.isDebug){
            Log.e(TAG,msg);
        }
    }
}
